home *** CD-ROM | disk | FTP | other *** search
- Path: newsbf02.news.aol.com!not-for-mail
- From: sguit@aol.com (SGUIT)
- Newsgroups: comp.lang.c++
- Subject: CFile read problem.........
- Date: 17 Mar 1996 16:43:39 -0500
- Organization: America Online, Inc. (1-800-827-6364)
- Sender: root@newsbf02.news.aol.com
- Message-ID: <4ii12b$brl@newsbf02.news.aol.com>
- Reply-To: sguit@aol.com (SGUIT)
- NNTP-Posting-Host: newsbf02.mail.aol.com
-
- I'm having problems with the following code:
-
- UINT BytesRead;
- char FromFile[25];
-
- // Create an object readMe of class CFile
- CFile readMe((buffer2),"\\config.dat", CFile::modeRead );
-
- // REad the file into FromFile
- BytesRead = readMe.Read ( FromFile, 25);
-
- // Add a null terminator
- FromFile[BytesRead] = 0;
-
- note: buffer2 is a string that contains the path where the config.dat
- file is located.
- We do not know the proper syntax required to use the buffer2 and
- config.dat file
- together. The code listed above does not work for this reason. We've tried
- many things
- without any luck. If we use this code: CFile
- readMe("C:\\Prog\\config.dat",
- CFile::modeRead ); it works fine....However, we need to use it with the
- buffer2 string
- which contains the path to the directory. We know that buffer2 string
- holds the path since
- we used "trace" to verify it.
-
- Does anyone know how to accomplish this?
- Thanks
- Steve t.
- sthomas@together.net
-
-
-
-
-
-